/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2021-07-17     MBW       the first version
 */
#ifndef NIMING_NIMING_H_
#define NIMING_NIMING_H_
#include "sys.h"

#define BYTE0(dwTemp)  (*(char*)(&dwTemp))
#define BYTE1(dwTemp)  (*((char*)(&dwTemp)+1))
#define BYTE2(dwTemp)  (*((char*)(&dwTemp)+2))
#define BYTE3(dwTemp)  (*((char*)(&dwTemp)+3))

typedef struct
{

    F_XYZ NavVel,angel,aac,NavAac,gyro,NavGyro,position;//显示
    F_XYZ in_dis,set_dis,delta_dis, in_vel ,  set_vel , delta_vel ;//显示三轴位置控制串级控制
    F_XYZ PidOut;//显示三轴位置控制的PID输出
    float Zdirection , out_thrust ,ThrustBase; //最终油门
    u16 hor_move_dis,hor_move_vel,hor_move_angel;
    u16 up_dis,down_dis;
    u16 turnR_angel,turnR_rad,turnL_angel,turnL_rad;
}nimingshow_data;

extern nimingshow_data NM_data;
void USART1_niming_report_HeightControl1(s16 ax,s16 ay,s16 az,s16 gx,s16 gy,s16 gz,u8 st);
void USART1_niming_report_speed(u16 a,u16 b,u16 c);
void USART1_niming_report_position(s32 a,s32 b);
void USART1_niming_report_dis(s32 a,s32 b,u8 fu);
void USART1_niming_report_angel(s16 a,s16 b,s16 c,u8 fu);
void flight_stat(u8 a,u8 b ,u8 c,u16 d);
void USART1_niming_report_HeightControl2(s16 a,s16 b,s16 c,s32 d , s16 e ,u8 f ,u8 g);
void USART1_niming_report_angel(s16 a,s16 b,s16 c,u8 fu);
void USART1_niming_report_batterVol(s16 a,s16 b);
void USART1_niming_report_F1(s32 a,s16 b,s16 c,s16 d,s16 e,s16 vx,s16 vy,s16 dx,s16 dy,s16 vz);
void USART1_niming_report_F2(s32 d1,s32 d2,s32 d3,s32 d4,s32 d5 ,s32 d6,s32 d7,s32 d8,s32 d9,s32 d10);
void USART1_niming_report_GPS(u8 fs,u8 sn,s32 lng,s32 lat,s32 ag,s16 ns,s16 es,s16 ds,u8 pd,u8 sa,u8 va);
void USART1_niming_report_RC(s16 rol,s16 pit,s16 thr,s16 yaw,s16 aux1,s16 aux2,s16 aux3,s16 aux4,s16 aux5,s16 aux6);
#endif /* NIMING_NIMING_H_ */
